package com.xianggu.designMode.combination.demo03;

/**
 * @author chengjy
 * @date 2025/3/20
 */
public class District implements PopulationNode{

    private String name;

    private int population;

    public District(String name, int population) {
        this.name = name;
        this.population = population;
    }

    @Override
    public int counPopulation() {
        return this.population;
    }

    @Override
    public String getName() {
        return this.name;
    }

    @Override
    public String toString() {
        return "District{" +
                "name='" + name + '\'' +
                ", population=" + population +
                '}';
    }
}
